#!/usr/bin/python
#coding=u8

class BaseHandler(object):
    def __init__(self):
        pass

    def get(self, req, resp):
        self.error(req, resp)

    def post(self, req, resp):
        self.error(req, resp)

    def put(self, req, resp):
        self.error(req, resp)

    def head(self, req, resp):
        self.error(req, resp)

    def error(self, req, resp, code=405):
        resp.status = code
        resp.body = str(resp.status)




